import {createPersistedState} from 'pinia-plugin-persistedstate'
export const piniaPluginPersistedstate = createPersistedState({
  key:(id)=>`__persisted__${id}`,//语义化git
  storage:{
    //用来处理多平台获取数据的兼容性
    getItem:(key)=>{
      return uni.getStorageSync(key)
    },
    setItem:(key,value)=>{
      uni.setStorageSync(key,value)
    }
  }
})
